﻿using EnvDTE;

namespace Skim.Ssms.AddIn.ActiveFileExplorer.Loader
{
    public static class DocumentNameParserFactory
    {
        public static IDocumentNameParser Create(Document document)
        {
            if (DocumentTypeFilter.IsQueryDocument(document)) return new QueryDocumentNameParser();
            if (DocumentTypeFilter.IsSolutionDocument(document)) return new SolutionDocumentNameParser();
            if (DocumentTypeFilter.IsDesignerDocument(document)) return new DesignDocumentNameParser();

            return new NullDocumentNameParser();
        }
    }
}
